package com.xu.myTest;

import com.alibaba.fastjson.JSON;
import com.google.common.collect.Maps;
import com.xu.model.Student;

import java.util.Map;

/**
 * 对象转json字符
 */
public class Json2Map {

    public static void main(String[] args) {
        String value = "{\"蓝胖子\":{\"student_id\":\"003\",\"student_name\":\"哆啦A梦\"}}";

        Map<String, Student> maps = JSON.parseObject(value, Map.class);

        System.out.println(maps.get("蓝胖子"));
    }


}
